using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
	[Table("bgm_request_kpi"), DataContract]
    public class RequestKpi
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "BgmReqKpiId", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("bgm_req_kpi_seq", TypeName="int")]
        public int BgmReqKpiId { get; set; }

		[DataMember, Display(Name = "BgmReqKpiName", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("bgm_req_kpi_name", TypeName="ntext")]
        public string BgmReqKpiName { get; set; }

		[DataMember, Display(Name = "BgmReqKpiDescr", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("bgm_req_kpi_descr", TypeName="ntext")]
        public string BgmReqKpiDescr { get; set; }

		[DataMember, Display(Name = "Unit", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("unit", TypeName="ntext")]
        public string Unit { get; set; }

		[DataMember, Display(Name = "BgmReqKpiWeight", ResourceType = typeof(Resources.RequestKpiResource))]
        [Column("bgm_req_kpi_weight", TypeName="decimal")]
        public Nullable<decimal> BgmReqKpiWeight { get; set; }

		[ForeignKey("BgmReq")]
		[DataMember, Display(Name = "BgmReqId", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("bgm_req_seq", TypeName="int")]
        public Nullable<int> BgmReqId { get; set; }

		[ForeignKey("BgmKpiType")]
		[DataMember, Display(Name = "BgmKpiTypeId", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("bgm_kpi_type_seq", TypeName="int")]
        public Nullable<int> BgmKpiTypeId { get; set; }

		[DataMember, Display(Name = "Score1", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("score1", TypeName="decimal")]
        public Nullable<decimal> Score1 { get; set; }

		[DataMember, Display(Name = "Score2", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("score2", TypeName="decimal")]
        public Nullable<decimal> Score2 { get; set; }

		[DataMember, Display(Name = "Score3", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("score3", TypeName="decimal")]
        public Nullable<decimal> Score3 { get; set; }

		[DataMember, Display(Name = "Score4", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("score4", TypeName="decimal")]
        public Nullable<decimal> Score4 { get; set; }

		[DataMember, Display(Name = "Score5", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("score5", TypeName="decimal")]
        public Nullable<decimal> Score5 { get; set; }

		[DataMember, Display(Name = "TargetType", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_type", TypeName="int")]
        public Nullable<int> TargetType { get; set; }

		[DataMember, Display(Name = "TargetM1", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m1", TypeName="decimal")]
        public Nullable<decimal> TargetM1 { get; set; }

		[DataMember, Display(Name = "TargetM2", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m2", TypeName="decimal")]
        public Nullable<decimal> TargetM2 { get; set; }

		[DataMember, Display(Name = "TargetM3", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m3", TypeName="decimal")]
        public Nullable<decimal> TargetM3 { get; set; }

		[DataMember, Display(Name = "TargetM4", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m4", TypeName="decimal")]
        public Nullable<decimal> TargetM4 { get; set; }

		[DataMember, Display(Name = "TargetM5", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m5", TypeName="decimal")]
        public Nullable<decimal> TargetM5 { get; set; }

		[DataMember, Display(Name = "TargetM6", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m6", TypeName="decimal")]
        public Nullable<decimal> TargetM6 { get; set; }

		[DataMember, Display(Name = "TargetM7", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m7", TypeName="decimal")]
        public Nullable<decimal> TargetM7 { get; set; }

		[DataMember, Display(Name = "TargetM8", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m8", TypeName="decimal")]
        public Nullable<decimal> TargetM8 { get; set; }

		[DataMember, Display(Name = "TargetM9", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m9", TypeName="decimal")]
        public Nullable<decimal> TargetM9 { get; set; }

		[DataMember, Display(Name = "TargetM10", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m10", TypeName="decimal")]
        public Nullable<decimal> TargetM10 { get; set; }

		[DataMember, Display(Name = "TargetM11", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m11", TypeName="decimal")]
        public Nullable<decimal> TargetM11 { get; set; }

		[DataMember, Display(Name = "TargetM12", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("target_m12", TypeName="decimal")]
        public Nullable<decimal> TargetM12 { get; set; }

		[DataMember, Display(Name = "Mtef1", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("mtef1", TypeName="decimal")]
        public Nullable<decimal> Mtef1 { get; set; }

		[DataMember, Display(Name = "Mtef2", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("mtef2", TypeName="decimal")]
        public Nullable<decimal> Mtef2 { get; set; }

		[DataMember, Display(Name = "Mtef3", ResourceType = typeof(Resources.RequestKpiResource))]
		[Column("mtef3", TypeName="decimal")]
        public Nullable<decimal> Mtef3 { get; set; }

        [DataMember]
        public virtual Request BgmReq { get; set; }

        [DataMember]
        public virtual MasKpiType BgmKpiType { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}